<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('个人信息机构建档拜访情况列表')"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <form class="form-horizontal" id="formPeasantDeptFiling">
        <input name="perType" type="hidden" value="1"/>
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <h3 style="margin-bottom: 5px; color: red; text-align: center">机构农户建档排名</h3>
            </div>
            <div class="btn-group-sm" id="toolbarPeasantDeptFiling" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()"
                   shiro:hasPermission="merchant:branchPerFilingVisits:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table-peasantDeptFiling"></table>
            </div>
        </div>
    </form>
    <form class="form-horizontal" id="formCitizenDeptFiling">
        <input name="perType" type="hidden" value="2"/>
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <h3 style="margin-bottom: 5px; color: red; text-align: center">机构新市民建档排名</h3>
            </div>
            <div class="btn-group-sm" id="toolbarCitizenDeptFiling" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()"
                   shiro:hasPermission="merchant:branchPerFilingVisits:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table-citizenDeptFiling"></table>
            </div>
        </div>
    </form>
    <form class="form-horizontal" id="formIdPeasantDeptVisits">
        <input name="perType" type="hidden" value="1"/>
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <h3 style="margin-bottom: 5px; color: red; text-align: center">机构农户拜访次数排名</h3>
            </div>
            <div class="btn-group-sm" id="toolbarPeasantDeptVisits" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()"
                   shiro:hasPermission="merchant:branchPerFilingVisits:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table-peasantDeptVisits"></table>
            </div>
        </div>
    </form>
    <form class="form-horizontal" id="formIdCitizenDeptVisits">
        <input name="perType" type="hidden" value="2"/>
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <h3 style="margin-bottom: 5px; color: red; text-align: center">机构新市民拜访次数排名</h3>
            </div>
            <div class="btn-group-sm" id="toolbarCitizenDeptVisits" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()"
                   shiro:hasPermission="merchant:branchPerFilingVisits:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table-citizenDeptVisits"></table>
            </div>
        </div>
    </form>
    <form class="form-horizontal" id="formIdPeasantDeptDoTask">
        <input name="perType" type="hidden" value="1"/>
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <h3 style="margin-bottom: 5px; color: red; text-align: center">机构农户超时拜访次数排名</h3>
            </div>
            <div class="btn-group-sm" id="toolbarPeasantDeptDoTask" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()"
                   shiro:hasPermission="merchant:branchPerFilingVisits:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table-peasantDeptDoTask"></table>
            </div>
        </div>
    </form>
    <form class="form-horizontal" id="formIdCitizenDeptDoTask">
        <input name="perType" type="hidden" value="2"/>
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <h3 style="margin-bottom: 5px; color: red; text-align: center">机构新市民超时拜访次数排名</h3>
            </div>
            <div class="btn-group-sm" id="toolbarCitizenDeptDoTask" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()"
                   shiro:hasPermission="merchant:branchPerFilingVisits:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table-citizenDeptDoTask"></table>
            </div>
        </div>
    </form>
    <form class="form-horizontal" id="formIdPeasantDeptUndoTask">
        <input name="perType" type="hidden" value="1"/>
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <h3 style="margin-bottom: 5px; color: red; text-align: center">机构农户超时未拜访次数排名</h3>
            </div>
            <div class="btn-group-sm" id="toolbarPeasantDeptUndoTask" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()"
                   shiro:hasPermission="merchant:branchPerFilingVisits:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table-peasantDeptUndoTask"></table>
            </div>
        </div>
    </form>
    <form class="form-horizontal" id="formIdCitizenDeptUndoTask">
        <input name="perType" type="hidden" value="2"/>
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <h3 style="margin-bottom: 5px; color: red; text-align: center">机构新市民超时未拜访次数排名</h3>
            </div>
            <div class="btn-group-sm" id="toolbarCitizenDeptUndoTask" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()"
                   shiro:hasPermission="merchant:branchPerFilingVisits:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table-citizenDeptUndoTask"></table>
            </div>
        </div>
    </form>
</div>

<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "merchant/personChart";

    $(function () {
        /*机构农户建档排名*/
        var deptPeasantFilingOptions = {
            id: 'bootstrap-table-peasantDeptFiling',
            toolbar: 'toolbarPeasantDeptFiling',
            formId: 'formPeasantDeptFiling',
            url: prefix + "/getPerDeptFilingList",
            exportUrl: prefix + "/exportPerDeptFilingList/1",
            modalName: "机构农户建档排名",
            columns: [
                {
                    field: 'deptName',
                    title: '机构名称'
                },
                {
                    field: 'rank',
                    title: '农户建档排名',
                    align: "center",
                },
                {
                    field: 'merchantNum',
                    title: '农户建档数',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'merchantLastMonthNum',
                    title: '上月新增',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'merchantThisMonthNum',
                    title: '本月新增',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'merchantCompareNum',
                    title: '较上月对比',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                }]
        };
        $.table.init(deptPeasantFilingOptions);
        /*机构新市民建档排名*/
        var deptCitizenFilingOptions = {
            id: 'bootstrap-table-citizenDeptFiling',
            toolbar: 'toolbarCitizenDeptFiling',
            formId: 'formCitizenDeptFiling',
            url: prefix + "/getPerDeptFilingList",
            exportUrl: prefix + "/exportPerDeptFilingList/2",
            modalName: "机构新市民建档排名",
            columns: [
                {
                    field: 'deptName',
                    title: '机构名称'
                },
                {
                    field: 'rank',
                    title: '新市民建档排名',
                    align: "center",
                },
                {
                    field: 'merchantNum',
                    title: '新市民建档数',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'merchantLastMonthNum',
                    title: '上月新增',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'merchantThisMonthNum',
                    title: '本月新增',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'merchantCompareNum',
                    title: '较上月对比',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                }]
        };
        $.table.init(deptCitizenFilingOptions);
        /*机构农户拜访次数排名*/
        var deptPeasantVisitsOptions = {
            id: 'bootstrap-table-peasantDeptVisits',
            toolbar: 'toolbarPeasantDeptVisits',
            formId: 'formIdPeasantDeptVisits',
            url: prefix + "/getPerDeptVisitsList",
            exportUrl: prefix + "/exportPerDeptVisitsList/1",
            modalName: "机构农户拜访次数排名",
            columns: [
                {
                    field: 'deptName',
                    title: '机构名称'
                },
                {
                    field: 'rank',
                    title: '农户拜访排名',
                    align: "center",
                },
                {
                    field: 'visitNum',
                    title: '农户拜访次数',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'visitLastMouthNum',
                    title: '上月新增',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'visitThisMouthNum',
                    title: '本月新增',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'visitCompareNum',
                    title: '较上月对比',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                }]
        };
        $.table.init(deptPeasantVisitsOptions);
        /*机构新市民拜访次数排名*/
        var deptCitizenVisitsOptions = {
            id: 'bootstrap-table-citizenDeptVisits',
            toolbar: 'toolbarCitizenDeptVisits',
            formId: 'formIdCitizenDeptVisits',
            url: prefix + "/getPerDeptVisitsList",
            exportUrl: prefix + "/exportPerDeptVisitsList/2",
            modalName: "机构新市民拜访次数排名",
            columns: [
                {
                    field: 'deptName',
                    title: '机构名称'
                },
                {
                    field: 'rank',
                    title: '新市民拜访排名',
                    align: "center",
                },
                {
                    field: 'visitNum',
                    title: '新市民拜访次数',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'visitLastMouthNum',
                    title: '上月新增',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'visitThisMouthNum',
                    title: '本月新增',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'visitCompareNum',
                    title: '较上月对比',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                }]
        };
        $.table.init(deptCitizenVisitsOptions);
        /*机构农户超时拜访次数排名*/
        var deptPeasantDoTaskOptions = {
            id: 'bootstrap-table-peasantDeptDoTask',
            toolbar: 'toolbarPeasantDeptDoTask',
            formId: 'formIdPeasantDeptDoTask',
            url: prefix + "/getPerDeptDoTaskList",
            exportUrl: prefix + "/exportPerDeptDoTaskList/1",
            modalName: "机构农户超时拜访次数排名",
            columns: [
                {
                    field: 'deptName',
                    title: '机构名称'
                },
                {
                    field: 'rank',
                    title: '农户超时拜访排名',
                    align: "center",
                },
                {
                    field: 'doTaskSum',
                    title: '农户超时拜访数',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'percentageDoTask',
                    title: '农户超时拜访率',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value) + '%';
                    }
                },
                {
                    field: 'rankPercentage',
                    title: '超时拜访率排名',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                }]
        };
        $.table.init(deptPeasantDoTaskOptions);
        /*机构新市民超时拜访次数排名*/
        var deptCitizenDoTaskOptions = {
            id: 'bootstrap-table-citizenDeptDoTask',
            toolbar: 'toolbarCitizenDeptDoTask',
            formId: 'formIdCitizenDeptDoTask',
            url: prefix + "/getPerDeptDoTaskList",
            exportUrl: prefix + "/exportPerDeptDoTaskList/2",
            modalName: "机构新市民超时拜访次数排名",
            columns: [
                {
                    field: 'deptName',
                    title: '机构名称'
                },
                {
                    field: 'rank',
                    title: '新市民超时拜访排名',
                    align: "center",
                },
                {
                    field: 'doTaskSum',
                    title: '新市民超时拜访数',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'percentageDoTask',
                    title: '新市民超时拜访率',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value) + '%';
                    }
                },
                {
                    field: 'rankPercentage',
                    title: '超时拜访率排名',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                }]
        };
        $.table.init(deptCitizenDoTaskOptions);
        /*机构农户超时未拜访次数排名*/
        var deptPeasantUndoTaskOptions = {
            id: 'bootstrap-table-peasantDeptUndoTask',
            toolbar: 'toolbarPeasantDeptUndoTask',
            formId: 'formIdPeasantDeptUndoTask',
            url: prefix + "/getPerDeptUnDoTaskList",
            exportUrl: prefix + "/exportPerDeptUnDoTaskList/1",
            modalName: "机构农户超时未拜访次数排名",
            columns: [
                {
                    field: 'deptName',
                    title: '机构名称'
                },
                {
                    field: 'rank',
                    title: '农户超时未拜访排名',
                    align: "center",
                },
                {
                    field: 'undoTaskSum',
                    title: '农户超时未拜访数量',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'percentageUndoTask',
                    title: '农户超时未拜访率',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value) + '%';
                    }
                },
                {
                    field: 'rankPercentage',
                    title: '超时未拜访率排名',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                }]
        };
        $.table.init(deptPeasantUndoTaskOptions);
        /*机构新市民超时未拜访次数排名*/
        var deptCitizenUndoTaskOptions = {
            id: 'bootstrap-table-citizenDeptUndoTask',
            toolbar: 'toolbarCitizenDeptUndoTask',
            formId: 'formIdCitizenDeptUndoTask',
            url: prefix + "/getPerDeptUnDoTaskList",
            exportUrl: prefix + "/exportPerDeptUnDoTaskList/2",
            modalName: "机构新市民超时未拜访次数排名",
            columns: [
                {
                    field: 'deptName',
                    title: '机构名称'
                },
                {
                    field: 'rank',
                    title: '新市民超时未拜访排名',
                    align: "center",
                },
                {
                    field: 'undoTaskSum',
                    title: '新市民超时未拜访数量',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                },
                {
                    field: 'percentageUndoTask',
                    title: '新市民超时未拜访率',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value) + '%';
                    }
                },
                {
                    field: 'rankPercentage',
                    title: '超时未拜访率排名',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.formatNumber(value);
                    }
                }]
        };
        $.table.init(deptCitizenUndoTaskOptions);
    })
</script>
</body>
</html>